package com.jsoft.service.impl;

import com.jsoft.dao.VoucherDao;
import com.jsoft.dao.impl.VoucherDaoImpl;
import com.jsoft.entity.Voucher;
import com.jsoft.service.VoucherService;

/**
 * @author:sha
 * @email:o68o4741@163.com
 * @date:2023/2/20
 */
public class VoucherServiceImpl implements VoucherService {
    VoucherDao voucherDao = new VoucherDaoImpl();
    @Override
    public Voucher getVoucherById(Integer id) throws Exception {
        return voucherDao.getVoucher(id);
    }

    @Override
    public int updateStatus(Integer id) throws Exception {
        return voucherDao.updateStatus(id);
    }

    @Override
    public int insertVoucher(Voucher voucher, Integer sourceId, Double balance) throws Exception {
        return voucherDao.insertVoucher(voucher, sourceId, balance);
    }
}
